/*
 * @Author: fisher
 * @Date: 2022-12-16 22:45:48
 * @LastEditTime: 2023-02-02 18:01:12
 * @LastEditors: your name
 * @Description:
 * @FilePath: /vite-vue-ts-h5/src/main.ts
 * 可以输入预定的版权声明、个性签名、空行等
 */
import './assets/style/global.vars.css'
import './assets/style/reset.css'
import './assets/style/common.css'
import router from './router'
import App from './App.vue'
import i18n from './i18n'
// import messages from '@intlify/vite-plugin-vue-i18n/messages'
import initGlobalAjax from './api'
import globalComponents from './common'
import store from './store'

if (import.meta.env.MODE !== 'production') {
  import('eruda').then(
    (eruda): void => {
      eruda.default.init()
    },
    (e) => {
      console.warn(e)
    }
  )
}

initGlobalAjax()
createApp(App)
  .use(router)
  .use(i18n)
  .use(store)
  .use(globalComponents)
  .mount('#app')
